import request from '@/utils/request'

// 删除分类
export function delCategoriesApi(ids) {
  return request({
    url: `categories/${ids}`,
    method: 'delete'
  })
}

// 修改分类
export function updateCategorieApi(id, data) {
  return request({
    url: `categories/${id}`,
    method: 'put',
    data
  })
}

// 新闻分类
export function getCategoriesApi(data) {
  return request({
    url: 'categories',
    method: 'get',
    params: data
  })
}